using PowerManage.Entity;
using PowerManage.Entity.Dtos.Permissions;

namespace PowerManage.Service;

public interface IPermissionService
{
    /// <summary>
    /// 获取所有权限
    /// </summary>
    /// <returns></returns>
    Task<List<PermissionDto>> GetAll();

    /// <summary>
    /// 添加权限
    /// </summary>
    /// <param name="permission"></param>
    /// <returns></returns>
    Task<ElePermission> Add(ElePermission permission);

    ///  <summary>
    /// 根据id获取权限
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<ElePermission?> GetById(long id);

    /// <summary>
    /// 更新权限
    /// </summary>
    /// <param name="permission"></param>
    /// <returns></returns>
    Task<bool> Update(ElePermission permission);

    /// <summary>
    /// 删除权限
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<bool> Delete(long id);
}